package com.add;

import com.lineage.config.ConfigAi;
import com.lineage.config.ConfigGuaji;
import com.lineage.data.event.AutoBot;
import com.lineage.server.datatables.RecordTable;
import com.lineage.server.datatables.SkillsTable;
import com.lineage.server.datatables.lock.CharSkillReading;
import com.lineage.server.model.Instance.L1PcInstance;
import com.lineage.server.serverpackets.S_CloseList;
import com.lineage.server.serverpackets.S_NPCTalkReturn;
import com.lineage.server.serverpackets.S_ServerMessage;
import com.lineage.server.serverpackets.S_SystemMessage;
import com.lineage.server.serverpackets.ServerBasePacket;
import com.lineage.server.templates.L1Skills;
import java.util.Calendar;
import java.util.Iterator;
import java.util.logging.Logger;

public class AutoAttackUpdate {
  private static final int[] _autoskill_buff;
  
  private static final int[] _autoskill_attack;
  
  private static final Logger _log = Logger.getLogger(AutoAttackUpdate.class.getName());
  
  private static AutoAttackUpdate _instance;
  
  static {
    _autoskill_buff = new int[] { 
        114, 115, 117, 88, 91, 3, 14, 26, 42, 48, 
        54, 68, 79, 129, 137, 138, 147, 148, 
        155, 163, 
        171, 149, 156, 166, 151, 159, 168, 160, 98, 99, 
        102, 106, 109, 110, 111, 105, 181, 191, 201, 
        206, 
        211, 216 };
    _autoskill_attack = new int[] { 
        87, 4, 6, 7, 10, 15, 16, 22, 25, 28, 
        34, 38, 45, 46, 53, 59, 65, 70, 74, 77, 
        132, 108, 184, 187, 192, 194, 218 };
  }
  
  public static AutoAttackUpdate getInstance() {
    if (_instance == null)
      _instance = new AutoAttackUpdate(); 
    return _instance;
  }
  
  public boolean PcCommand(L1PcInstance _pc, String cmd) {
    if (!AutoBot.START)
      return false; 
    if (cmd.equalsIgnoreCase("go_guajiok")) {
      Calendar date = Calendar.getInstance();
      int nowHour = date.get(11);
      if (ConfigGuaji.checktimeguaji) {
        int[] GUAJI_TIME = ConfigGuaji.GUAJI_ITEM;
        int array[], length = (array = GUAJI_TIME).length;
        int i = 0;
        while (i < length) {
          int guajitimme = array[i];
          if (nowHour == guajitimme) {
            _pc.sendPackets((ServerBasePacket)new S_ServerMessage("此时间未开放使用挂机"));
            return false;
          } 
          i++;
        } 
      } 
      if (ConfigGuaji.Guaji_action && !_pc.getMap().isGuaji()) {
        _pc.sendPackets((ServerBasePacket)new S_ServerMessage("此地图无法挂机.."));
        return false;
      } 
      if (_pc.isActived()) {
        _pc.setActived(false);
        _pc.sendPackets((ServerBasePacket)new S_ServerMessage(" 自动狩猎已停止。"));
        L1PcUnlock.Pc_Unlock(_pc);
        if (_pc.get_fwgj() > 0) {
          _pc.setlslocx(0);
          _pc.setlslocy(0);
          _pc.set_fwgj(0);
        } 
        _pc.killSkillEffectTimer(8853);
        _pc.killSkillEffectTimer(6930);
        _pc.killSkillEffectTimer(6931);
        _pc.killSkillEffectTimer(6932);
        if (ConfigAi.longntimeai_3)
          _pc.setSkillEffect(6930, 300000); 
        return false;
      } 
      if (!_pc.isActived()) {
        if (_pc.hasSkillEffect(99666)) {
          _pc.sendPackets((ServerBasePacket)new S_ServerMessage("该道具使用延迟中请稍候再执行"));
          return false;
        } 
        L1PcUnlock.Pc_Unlock(_pc);
        _pc.sendPackets((ServerBasePacket)new S_ServerMessage("自动狩猎已开始。"));
        _pc.sendPackets((ServerBasePacket)new S_ServerMessage("请勿在自动狩猎点击物品.消失物品一概不负责"));
        RecordTable.get().guaji(_pc.getName(), "道具启动");
        _pc.killSkillEffectTimer(6930);
        _pc.killSkillEffectTimer(6931);
        _pc.killSkillEffectTimer(6932);
        if (ConfigAi.longntimeai_3)
          _pc.setSkillEffect(6930, 300000); 
        if (_pc.get_fwgj() == 0)
          _pc.setSkillEffect(8853, 60000); 
        _pc.startAI();
        _pc.setSkillEffect(99666, 15000);
      } 
    } else if (cmd.equalsIgnoreCase("Au_30")) {
      if (_pc.isActived()) {
        _pc.sendPackets((ServerBasePacket)new S_ServerMessage("内挂中,无法进行此操作。"));
        return false;
      } 
      _pc.setlslocx(_pc.getX());
      _pc.setlslocy(_pc.getY());
      _pc.setgo_guajitele(false);
      _pc.set_fwgj(_pc.get_fwgj() + 5);
      guaji(_pc);
    } else if (cmd.equalsIgnoreCase("Au_31")) {
      if (_pc.isActived()) {
        _pc.sendPackets((ServerBasePacket)new S_ServerMessage("内挂中,无法进行此操作。"));
        return false;
      } 
      _pc.setlslocx(_pc.getX());
      _pc.setlslocy(_pc.getY());
      _pc.setgo_guajitele(false);
      _pc.set_fwgj(_pc.get_fwgj() - 5);
      if (_pc.get_fwgj() <= 0) {
        _pc.set_fwgj(0);
        _pc.setlslocx(0);
        _pc.setlslocy(0);
      } 
      guaji(_pc);
    } else if (cmd.equalsIgnoreCase("Au_32")) {
      _pc.setitempotion(0);
      _pc.setitemitemid(0);
      _pc.setitemadena(0);
      _pc.setitempotion1(0);
      _pc.setitemitemid1(0);
      _pc.setitemadena1(0);
      _pc.setpotioncount(0);
      _pc.setpotioncount1(0);
      _pc.setitempotion2(0);
      _pc.setitemitemid2(0);
      _pc.setitemadena2(0);
      _pc.setpotioncount2(0);
      guaji_ai03(_pc);
    } else if (cmd.equalsIgnoreCase("Au_33")) {
      if (_pc.getitempotion() == 0) {
        _pc.setitempotion(1);
        _pc.setitemitemid(40010);
        _pc.setitemadena(ConfigGuaji.itemadena1);
      } else if (_pc.getitempotion() == 1) {
        _pc.setitempotion(2);
        _pc.setitemitemid(40011);
        _pc.setitemadena(ConfigGuaji.itemadena2);
      } else if (_pc.getitempotion() == 2) {
        _pc.setitempotion(3);
        _pc.setitemitemid(40012);
        _pc.setitemadena(ConfigGuaji.itemadena3);
      } else if (_pc.getitempotion() == 3) {
        _pc.setitempotion(4);
        _pc.setitemitemid(40019);
        _pc.setitemadena(ConfigGuaji.itemadena4);
      } else if (_pc.getitempotion() == 4) {
        _pc.setitempotion(5);
        _pc.setitemitemid(40020);
        _pc.setitemadena(ConfigGuaji.itemadena5);
      } else if (_pc.getitempotion() == 5) {
        _pc.setitempotion(6);
        _pc.setitemitemid(40021);
        _pc.setitemadena(ConfigGuaji.itemadena6);
      } else if (_pc.getitempotion() == 6) {
        _pc.setitempotion(7);
        _pc.setitemitemid(40022);
        _pc.setitemadena(ConfigGuaji.itemadena7);
      } else if (_pc.getitempotion() == 7) {
        _pc.setitempotion(8);
        _pc.setitemitemid(40023);
        _pc.setitemadena(ConfigGuaji.itemadena8);
      } else if (_pc.getitempotion() == 8) {
        _pc.setitempotion(9);
        _pc.setitemitemid(40024);
        _pc.setitemadena(ConfigGuaji.itemadena9);
      } else if (_pc.getitempotion() == 9) {
        _pc.setitempotion(0);
        _pc.setitemitemid(0);
        _pc.setitemadena(0);
      } 
      guaji_ai03(_pc);
    } else if (cmd.equalsIgnoreCase("Au_34")) {
      if (_pc.getitempotion1() == 0) {
        _pc.setitempotion1(1);
        _pc.setitemitemid1(40010);
        _pc.setitemadena1(ConfigGuaji.itemadena1);
      } else if (_pc.getitempotion1() == 1) {
        _pc.setitempotion1(2);
        _pc.setitemitemid1(40011);
        _pc.setitemadena1(ConfigGuaji.itemadena2);
      } else if (_pc.getitempotion1() == 2) {
        _pc.setitempotion1(3);
        _pc.setitemitemid1(40012);
        _pc.setitemadena1(ConfigGuaji.itemadena3);
      } else if (_pc.getitempotion1() == 3) {
        _pc.setitempotion1(4);
        _pc.setitemitemid1(40019);
        _pc.setitemadena1(ConfigGuaji.itemadena4);
      } else if (_pc.getitempotion1() == 4) {
        _pc.setitempotion1(5);
        _pc.setitemitemid1(40020);
        _pc.setitemadena1(ConfigGuaji.itemadena5);
      } else if (_pc.getitempotion1() == 5) {
        _pc.setitempotion1(6);
        _pc.setitemitemid1(40021);
        _pc.setitemadena1(ConfigGuaji.itemadena6);
      } else if (_pc.getitempotion1() == 6) {
        _pc.setitempotion1(7);
        _pc.setitemitemid1(40022);
        _pc.setitemadena1(ConfigGuaji.itemadena7);
      } else if (_pc.getitempotion1() == 7) {
        _pc.setitempotion1(8);
        _pc.setitemitemid1(40023);
        _pc.setitemadena1(ConfigGuaji.itemadena8);
      } else if (_pc.getitempotion1() == 8) {
        _pc.setitempotion1(9);
        _pc.setitemitemid1(40024);
        _pc.setitemadena1(ConfigGuaji.itemadena9);
      } else if (_pc.getitempotion1() == 9) {
        _pc.setitempotion1(0);
        _pc.setitemitemid1(0);
        _pc.setitemadena1(0);
      } 
      guaji_ai03(_pc);
    } else if (cmd.equalsIgnoreCase("Au_35")) {
      if (_pc.getitempotion2() == 0) {
        _pc.setitempotion2(1);
        _pc.setitemitemid2(40743);
        _pc.setitemadena2(ConfigGuaji.itemadena21);
      } else if (_pc.getitempotion2() == 1) {
        _pc.setitempotion2(2);
        _pc.setitemitemid2(40744);
        _pc.setitemadena2(ConfigGuaji.itemadena22);
      } else if (_pc.getitempotion2() == 2) {
        _pc.setitempotion2(0);
        _pc.setitemitemid2(0);
        _pc.setitemadena2(0);
      } 
      guaji_ai03(_pc);
    } else if (cmd.equalsIgnoreCase("Au_36")) {
      _pc.setpotioncount(_pc.getpotioncount() + 50);
      guaji_ai03(_pc);
    } else if (cmd.equalsIgnoreCase("Au_37")) {
      _pc.setpotioncount1(_pc.getpotioncount1() + 50);
      guaji_ai03(_pc);
    } else if (cmd.equalsIgnoreCase("Au_38")) {
      _pc.setpotioncount2(_pc.getpotioncount2() + 1000);
      guaji_ai03(_pc);
    } else if (cmd.equalsIgnoreCase("Au_29")) {
      if (_pc.getgo_guajitele()) {
        _pc.setgo_guajitele(false);
        _pc.get_other1().set_type24(0);
        guaji_ai04(_pc);
      } else {
        _pc.setgo_guajitele(true);
        _pc.get_other1().set_type24(1);
        if (_pc.get_fwgj() > 0) {
          _pc.setlslocx(0);
          _pc.setlslocy(0);
          _pc.set_fwgj(0);
        } 
        guaji_ai04(_pc);
      } 
    } else if (cmd.equalsIgnoreCase("Au_39")) {
      if (_pc.getgo_guajired()) {
        _pc.setgo_guajired(false);
        _pc.get_other1().set_type25(0);
        guaji_ai04(_pc);
      } else {
        _pc.setgo_guajired(true);
        _pc.get_other1().set_type25(1);
        guaji_ai04(_pc);
      } 
    } else if (cmd.equalsIgnoreCase("Au_40")) {
      _pc.setma1(_pc.getma1() + 5);
      guaji_ai01(_pc);
    } else if (cmd.equalsIgnoreCase("Au_41")) {
      _pc.setma1(_pc.getma1() - 5);
      guaji_ai01(_pc);
    } else if (cmd.equalsIgnoreCase("Au_1")) {
      if (_pc.IsAttackTeleport()) {
        _pc.setIsAttackTeleport(false);
        _pc.get_other1().set_type12(0);
      } else {
        _pc.setIsAttackTeleport(true);
        _pc.get_other1().set_type12(1);
      } 
      guaji_ai04(_pc);
    } else if (cmd.equalsIgnoreCase("Au_2")) {
      if (_pc.IsEnemyTeleport()) {
        _pc.setIsEnemyTeleport(false);
        _pc.get_other1().set_type13(0);
      } else {
        _pc.setIsEnemyTeleport(true);
        _pc.get_other1().set_type13(1);
      } 
      guaji_ai04(_pc);
    } else if (cmd.equalsIgnoreCase("Au_3")) {
      _pc.setKeyInEnemy(true);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU请输入玩家名称。"));
    } else if (cmd.equalsIgnoreCase("Au_4")) {
      _pc.setKeyOutEnemy(true);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU请输入玩家名称。"));
    } else if (cmd.equalsIgnoreCase("Au_5")) {
      EnemyList(_pc);
    } else if (cmd.equalsIgnoreCase("Au_6")) {
      NewAutoPractice.get().SearchAutoLog(_pc);
    } else if (cmd.equalsIgnoreCase("Au_14")) {
      CanSkillList(_pc, 2);
    } else if (cmd.equalsIgnoreCase("Au_15")) {
      SkillList(_pc, 2);
    } else if (cmd.equalsIgnoreCase("Au_16")) {
      if (_pc.IsAttackSkill()) {
        _pc.setAttackSkill(false);
        _pc.sendPackets((ServerBasePacket)new S_SystemMessage("取消登录自动执行[攻击]技能"));
      } else {
        _pc.setAttackSkill(true);
        _pc.sendPackets((ServerBasePacket)new S_SystemMessage("请手动施放一次欲新增的攻击技能"));
      } 
    } else if (cmd.equalsIgnoreCase("Au_19")) {
      NewAutoPractice.get().ClearAutoLog(_pc.getId());
      _pc.sendPackets((ServerBasePacket)new S_CloseList(_pc.getId()));
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU纪录已删除。"));
    } else if (cmd.equalsIgnoreCase("Au_21")) {
      _pc.clearAttackSkillList();
      if (_pc.get_other1().get_type46() > 0)
        _pc.get_other1().set_type46(0); 
      if (_pc.get_other1().get_type47() > 0)
        _pc.get_other1().set_type47(0); 
      if (_pc.get_other1().get_type48() > 0)
        _pc.get_other1().set_type48(0); 
      if (_pc.get_other1().get_type49() > 0)
        _pc.get_other1().set_type49(0); 
      if (_pc.get_other1().get_type50() > 0)
        _pc.get_other1().set_type50(0); 
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU纪录已删除。"));
    } else if (cmd.equalsIgnoreCase("Au_60")) {
      if (_pc.getmobatk()) {
        _pc.setmobatk(false);
      } else {
        _pc.setmobatk(true);
      } 
      guaji(_pc);
    } else if (cmd.equalsIgnoreCase("Au_43")) {
      if (!CharSkillReading.get().spellCheck(_pc.getId(), 51)) {
        _pc.sendPackets((ServerBasePacket)new S_SystemMessage("您尚未学习召唤术"));
        return false;
      } 
      if (_pc.getInventory().checkEquipped(20284) && _pc.getSummon_npcid() == null) {
        _pc.sendPackets((ServerBasePacket)new S_SystemMessage("携带召戒,请先设定要召唤的怪物"));
        return false;
      } 
      if (_pc.getchecksummid()) {
        _pc.setchecksummid(false);
      } else {
        _pc.setchecksummid(true);
      } 
      guaji_ai02(_pc);
    } else if (cmd.equalsIgnoreCase("Au_44")) {
      if (_pc.getsummon_skillid() == 1) {
        if (!CharSkillReading.get().spellCheck(_pc.getId(), 19)) {
          _pc.sendPackets((ServerBasePacket)new S_SystemMessage("您尚未学习中治"));
          return false;
        } 
        _pc.setsummon_skillid(19);
        _pc.setsummon_skillidmp(15);
      } else if (_pc.getsummon_skillid() == 19) {
        if (!CharSkillReading.get().spellCheck(_pc.getId(), 35)) {
          _pc.sendPackets((ServerBasePacket)new S_SystemMessage("您尚未学习高治"));
          return false;
        } 
        _pc.setsummon_skillid(35);
        _pc.setsummon_skillidmp(20);
      } else if (_pc.getsummon_skillid() == 35) {
        if (!CharSkillReading.get().spellCheck(_pc.getId(), 57)) {
          _pc.sendPackets((ServerBasePacket)new S_SystemMessage("您尚未学习全治"));
          return false;
        } 
        _pc.setsummon_skillid(57);
        _pc.setsummon_skillidmp(48);
      } else if (_pc.getsummon_skillid() == 57) {
        _pc.setsummon_skillid(1);
        _pc.setsummon_skillidmp(4);
      } else if (_pc.getsummon_skillid() == 0) {
        if (!CharSkillReading.get().spellCheck(_pc.getId(), 1)) {
          _pc.sendPackets((ServerBasePacket)new S_SystemMessage("您尚未学习初治"));
          return false;
        } 
        _pc.setsummon_skillid(1);
        _pc.setsummon_skillidmp(4);
      } 
      guaji_ai02(_pc);
    } else if (cmd.equalsIgnoreCase("Au_45")) {
      if (_pc.getchecksummidhp()) {
        _pc.setchecksummidhp(false);
      } else {
        _pc.setchecksummidhp(true);
      } 
      guaji_ai02(_pc);
    } else if (cmd.equalsIgnoreCase("Au_46")) {
      if (!_pc.getInventory().checkEquipped(20284)) {
        _pc.sendPackets((ServerBasePacket)new S_SystemMessage("未装备[召唤控制戒指]"));
        return false;
      } 
      _pc.sendPackets((ServerBasePacket)new S_NPCTalkReturn(_pc.getId(), "guajisummon"));
    } else if (cmd.equalsIgnoreCase("summ_7")) {
      _pc.setSummon_npcid("7");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_263")) {
      _pc.setSummon_npcid("263");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_519")) {
      _pc.setSummon_npcid("519");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_8")) {
      _pc.setSummon_npcid("8");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_264")) {
      _pc.setSummon_npcid("264");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_520")) {
      _pc.setSummon_npcid("520");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_9")) {
      _pc.setSummon_npcid("9");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_265")) {
      _pc.setSummon_npcid("265");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_521")) {
      _pc.setSummon_npcid("521");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_10")) {
      _pc.setSummon_npcid("10");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_266")) {
      _pc.setSummon_npcid("266");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_522")) {
      _pc.setSummon_npcid("522");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_11")) {
      _pc.setSummon_npcid("11");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_267")) {
      _pc.setSummon_npcid("267");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_523")) {
      _pc.setSummon_npcid("523");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_12")) {
      _pc.setSummon_npcid("12");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_268")) {
      _pc.setSummon_npcid("268");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_524")) {
      _pc.setSummon_npcid("524");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_13")) {
      _pc.setSummon_npcid("13");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_269")) {
      _pc.setSummon_npcid("269");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_525")) {
      _pc.setSummon_npcid("525");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_14")) {
      _pc.setSummon_npcid("14");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_270")) {
      _pc.setSummon_npcid("270");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_526")) {
      _pc.setSummon_npcid("526");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_15")) {
      _pc.setSummon_npcid("15");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_271")) {
      _pc.setSummon_npcid("271");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_527")) {
      _pc.setSummon_npcid("527");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_16")) {
      _pc.setSummon_npcid("16");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_17")) {
      _pc.setSummon_npcid("17");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else if (cmd.equalsIgnoreCase("summ_18")) {
      _pc.setSummon_npcid("18");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } else {
      if (!cmd.equalsIgnoreCase("summ_274"))
        return false; 
      _pc.setSummon_npcid("274");
      guaji_ai02(_pc);
      _pc.sendPackets((ServerBasePacket)new S_ServerMessage("\\fU设定召戒召唤怪物完成。"));
    } 
    return true;
  }
  
  public void CanSkillList(L1PcInstance pc, int mode) {
    StringBuilder msg = new StringBuilder();
    if (mode == 1) {
      int i = 0;
      while (i < _autoskill_buff.length) {
        if (CharSkillReading.get().spellCheck(pc.getId(), _autoskill_buff[i])) {
          L1Skills skill = SkillsTable.get().getTemplate(_autoskill_buff[i]);
          msg.append(String.valueOf(String.valueOf(skill.getName())) + ",");
        } 
        i++;
      } 
    } else {
      int i = 0;
      while (i < _autoskill_attack.length) {
        if (CharSkillReading.get().spellCheck(pc.getId(), _autoskill_attack[i])) {
          L1Skills skill = SkillsTable.get().getTemplate(_autoskill_attack[i]);
          msg.append(String.valueOf(String.valueOf(skill.getName())) + ",");
        } 
        i++;
      } 
    } 
    String[] clientStrAry = msg.toString().split(",");
    pc.sendPackets((ServerBasePacket)new S_NPCTalkReturn(pc.getId(), "x_autolist3", clientStrAry));
  }
  
  public void SkillList(L1PcInstance pc, int mode) {
    StringBuilder msg = new StringBuilder();
    if (mode == 1) {
      Iterator<Integer> iterator = pc.BuffSkillList().iterator();
      while (iterator.hasNext()) {
        Integer id = iterator.next();
        L1Skills skill = SkillsTable.get().getTemplate(id.intValue());
        msg.append(String.valueOf(String.valueOf(skill.getName())) + ",");
      } 
    } else {
      Iterator<Integer> iterator2 = pc.AttackSkillList().iterator();
      while (iterator2.hasNext()) {
        Integer id = iterator2.next();
        L1Skills skill = SkillsTable.get().getTemplate(id.intValue());
        msg.append(String.valueOf(String.valueOf(skill.getName())) + ",");
      } 
    } 
    String[] clientStrAry = msg.toString().split(",");
    pc.sendPackets((ServerBasePacket)new S_NPCTalkReturn(pc.getId(), "x_autolist3", clientStrAry));
  }
  
  public void EnemyList(L1PcInstance pc) {
    StringBuilder msg = new StringBuilder();
    Iterator<String> iterator = pc.InEnemyList().iterator();
    while (iterator.hasNext()) {
      String name = iterator.next();
      msg.append(String.valueOf(String.valueOf(name)) + ",");
    } 
    String[] clientStrAry = msg.toString().split(",");
    pc.sendPackets((ServerBasePacket)new S_NPCTalkReturn(pc.getId(), "x_autolist2", clientStrAry));
  }
  
  public boolean isBuffSkill(int Skillid) {
    int autoskill_buff[], length = (autoskill_buff = _autoskill_buff).length;
    int i = 0;
    while (i < length) {
      int skillId = autoskill_buff[i];
      if (skillId == Skillid)
        return true; 
      i++;
    } 
    return false;
  }
  
  public boolean isAttackSkill(int Skillid) {
    int autoskill_attack[], length = (autoskill_attack = _autoskill_attack).length;
    int i = 0;
    while (i < length) {
      int skillId = autoskill_attack[i];
      if (skillId == Skillid)
        return true; 
      i++;
    } 
    return false;
  }
  
  public void guaji_ai01(L1PcInstance pc) {
    String type1 = "";
    String type2 = "";
    String type3 = "";
    String type4 = "";
    String type5 = "";
    String type6 = "";
    String type7 = "";
    String type8 = "";
    String type9 = "";
    String type10 = "";
    String type11 = "";
    String type12 = "";
    String type13 = "";
    String type14 = "";
    String type15 = "";
    String type16 = "";
    String type17 = "";
    if (pc.get_fwgj() > 0) {
      int i = pc.get_fwgj();
    } else {
      type1 = "0";
    } 
    if (pc.getitempotion() > 0) {
      if (pc.getitempotion() == 1) {
        type2 = "红色药水";
      } else if (pc.getitempotion() == 2) {
        type2 = "橙色药水";
      } else if (pc.getitempotion() == 3) {
        type2 = "白色药水";
      } else if (pc.getitempotion() == 4) {
        type2 = "浓缩红水";
      } else if (pc.getitempotion() == 5) {
        type2 = "浓缩橙水";
      } else if (pc.getitempotion() == 6) {
        type2 = "浓缩白水";
      } else if (pc.getitempotion() == 7) {
        type2 = "古代红水";
      } else if (pc.getitempotion() == 8) {
        type2 = "古代橙水";
      } else if (pc.getitempotion() == 9) {
        type2 = "古代白水";
      } 
    } else {
      type2 = "尚未设定";
    } 
    if (pc.getpotioncount() > 0) {
      int i = pc.getpotioncount();
    } else {
      type3 = "0";
    } 
    if (pc.getitempotion1() > 0) {
      if (pc.getitempotion1() == 1) {
        type4 = "红色药水";
      } else if (pc.getitempotion1() == 2) {
        type4 = "橙色药水";
      } else if (pc.getitempotion1() == 3) {
        type4 = "白色药水";
      } else if (pc.getitempotion1() == 4) {
        type4 = "浓缩红水";
      } else if (pc.getitempotion1() == 5) {
        type4 = "浓缩橙水";
      } else if (pc.getitempotion1() == 6) {
        type4 = "浓缩白水";
      } else if (pc.getitempotion1() == 7) {
        type4 = "古代红水";
      } else if (pc.getitempotion1() == 8) {
        type4 = "古代橙水";
      } else if (pc.getitempotion1() == 9) {
        type4 = "古代白水";
      } 
    } else {
      type4 = "尚未设定";
    } 
    if (pc.getpotioncount1() > 0) {
      int i = pc.getpotioncount1();
    } else {
      type5 = "0";
    } 
    if (pc.getitempotion2() > 0) {
      if (pc.getitempotion2() == 1) {
        type6 = "箭";
      } else if (pc.getitempotion2() == 2) {
        type6 = "银箭";
      } 
    } else if (pc.getitempotion2() == 0) {
      type6 = "尚未设定";
    } 
    if (pc.getpotioncount2() > 0) {
      int i = pc.getpotioncount2();
    } else {
      type7 = "0";
    } 
    if (pc.getgo_guajitele()) {
      type8 = "[开启]";
    } else {
      type8 = "[关闭]";
    } 
    if (pc.getgo_guajired()) {
      type9 = "[开启]";
    } else {
      type9 = "[关闭]";
    } 
    if (pc.IsAttackTeleport()) {
      type10 = "[开启]";
    } else {
      type10 = "[关闭]";
    } 
    if (pc.IsEnemyTeleport()) {
      type11 = "[开启]";
    } else {
      type11 = "[关闭]";
    } 
    if (pc.getma1() > 0) {
      int i = pc.getma1();
    } else {
      type12 = "未设置";
    } 
    if (pc.getchecksummid()) {
      type13 = "[开启]";
    } else {
      type13 = "[关闭]";
    } 
    if (pc.getsummon_skillid() > 0) {
      if (pc.getsummon_skillid() == 1) {
        type14 = "[初治愈]";
      } else if (pc.getsummon_skillid() == 19) {
        type14 = "[中治愈]";
      } else if (pc.getsummon_skillid() == 35) {
        type14 = "[高治愈]";
      } else if (pc.getsummon_skillid() == 57) {
        type14 = "[全治愈]";
      } 
    } else {
      type14 = "[尚未设置]";
    } 
    if (pc.getchecksummidhp()) {
      type15 = "[开启]";
    } else {
      type15 = "[关闭]";
    } 
    if (pc.getmobatk()) {
      type16 = "[开启]";
    } else {
      type16 = "[关闭]";
    } 
    pc.sendPackets((ServerBasePacket)new S_NPCTalkReturn(pc.getId(), "AI", new String[] { 
            type1, type2, type3, type4, type5, type6, 
            type7, type8, type9, type10, 
            type11, type12, type13, type14, type15, type16 }));
  }
  
  public void guaji_ai02(L1PcInstance pc) {
    String type1 = "";
    String type2 = "";
    String type3 = "";
    String type4 = "";
    String type5 = "";
    String type6 = "";
    String type7 = "";
    String type8 = "";
    String type9 = "";
    String type10 = "";
    String type11 = "";
    String type12 = "";
    String type13 = "";
    String type14 = "";
    String type15 = "";
    String type16 = "";
    String type17 = "";
    if (pc.get_fwgj() > 0) {
      int i = pc.get_fwgj();
    } else {
      type1 = "0";
    } 
    if (pc.getitempotion() > 0) {
      if (pc.getitempotion() == 1) {
        type2 = "红色药水";
      } else if (pc.getitempotion() == 2) {
        type2 = "橙色药水";
      } else if (pc.getitempotion() == 3) {
        type2 = "白色药水";
      } else if (pc.getitempotion() == 4) {
        type2 = "浓缩红水";
      } else if (pc.getitempotion() == 5) {
        type2 = "浓缩橙水";
      } else if (pc.getitempotion() == 6) {
        type2 = "浓缩白水";
      } else if (pc.getitempotion() == 7) {
        type2 = "古代红水";
      } else if (pc.getitempotion() == 8) {
        type2 = "古代橙水";
      } else if (pc.getitempotion() == 9) {
        type2 = "古代白水";
      } 
    } else {
      type2 = "尚未设定";
    } 
    if (pc.getpotioncount() > 0) {
      int i = pc.getpotioncount();
    } else {
      type3 = "0";
    } 
    if (pc.getitempotion1() > 0) {
      if (pc.getitempotion1() == 1) {
        type4 = "红色药水";
      } else if (pc.getitempotion1() == 2) {
        type4 = "橙色药水";
      } else if (pc.getitempotion1() == 3) {
        type4 = "白色药水";
      } else if (pc.getitempotion1() == 4) {
        type4 = "浓缩红水";
      } else if (pc.getitempotion1() == 5) {
        type4 = "浓缩橙水";
      } else if (pc.getitempotion1() == 6) {
        type4 = "浓缩白水";
      } else if (pc.getitempotion1() == 7) {
        type4 = "古代红水";
      } else if (pc.getitempotion1() == 8) {
        type4 = "古代橙水";
      } else if (pc.getitempotion1() == 9) {
        type4 = "古代白水";
      } 
    } else {
      type4 = "尚未设定";
    } 
    if (pc.getpotioncount1() > 0) {
      int i = pc.getpotioncount1();
    } else {
      type5 = "0";
    } 
    if (pc.getitempotion2() > 0) {
      if (pc.getitempotion2() == 1) {
        type6 = "箭";
      } else if (pc.getitempotion2() == 2) {
        type6 = "银箭";
      } 
    } else if (pc.getitempotion2() == 0) {
      type6 = "尚未设定";
    } 
    if (pc.getpotioncount2() > 0) {
      int i = pc.getpotioncount2();
    } else {
      type7 = "0";
    } 
    if (pc.getgo_guajitele()) {
      type8 = "[开启]";
    } else {
      type8 = "[关闭]";
    } 
    if (pc.getgo_guajired()) {
      type9 = "[开启]";
    } else {
      type9 = "[关闭]";
    } 
    if (pc.IsAttackTeleport()) {
      type10 = "[开启]";
    } else {
      type10 = "[关闭]";
    } 
    if (pc.IsEnemyTeleport()) {
      type11 = "[开启]";
    } else {
      type11 = "[关闭]";
    } 
    if (pc.getma1() > 0) {
      int i = pc.getma1();
    } else {
      type12 = "未设置";
    } 
    if (pc.getchecksummid()) {
      type13 = "[开启]";
    } else {
      type13 = "[关闭]";
    } 
    if (pc.getsummon_skillid() > 0) {
      if (pc.getsummon_skillid() == 1) {
        type14 = "[初治愈]";
      } else if (pc.getsummon_skillid() == 19) {
        type14 = "[中治愈]";
      } else if (pc.getsummon_skillid() == 35) {
        type14 = "[高治愈]";
      } else if (pc.getsummon_skillid() == 57) {
        type14 = "[全治愈]";
      } 
    } else {
      type14 = "[尚未设置]";
    } 
    if (pc.getchecksummidhp()) {
      type15 = "[开启]";
    } else {
      type15 = "[关闭]";
    } 
    if (pc.getmobatk()) {
      type16 = "[开启]";
    } else {
      type16 = "[关闭]";
    } 
    pc.sendPackets((ServerBasePacket)new S_NPCTalkReturn(pc.getId(), "AI", new String[] { 
            type1, type2, type3, type4, type5, type6, 
            type7, type8, type9, type10, 
            type11, type12, type13, type14, type15, type16 }));
  }
  
  public void guaji_ai03(L1PcInstance pc) {
    String type1 = "";
    String type2 = "";
    String type3 = "";
    String type4 = "";
    String type5 = "";
    String type6 = "";
    String type7 = "";
    String type8 = "";
    String type9 = "";
    String type10 = "";
    String type11 = "";
    String type12 = "";
    String type13 = "";
    String type14 = "";
    String type15 = "";
    String type16 = "";
    String type17 = "";
    if (pc.get_fwgj() > 0) {
      int i = pc.get_fwgj();
    } else {
      type1 = "0";
    } 
    if (pc.getitempotion() > 0) {
      if (pc.getitempotion() == 1) {
        type2 = "红色药水";
      } else if (pc.getitempotion() == 2) {
        type2 = "橙色药水";
      } else if (pc.getitempotion() == 3) {
        type2 = "白色药水";
      } else if (pc.getitempotion() == 4) {
        type2 = "浓缩红水";
      } else if (pc.getitempotion() == 5) {
        type2 = "浓缩橙水";
      } else if (pc.getitempotion() == 6) {
        type2 = "浓缩白水";
      } else if (pc.getitempotion() == 7) {
        type2 = "古代红水";
      } else if (pc.getitempotion() == 8) {
        type2 = "古代橙水";
      } else if (pc.getitempotion() == 9) {
        type2 = "古代白水";
      } 
    } else {
      type2 = "尚未设定";
    } 
    if (pc.getpotioncount() > 0) {
      int i = pc.getpotioncount();
    } else {
      type3 = "0";
    } 
    if (pc.getitempotion1() > 0) {
      if (pc.getitempotion1() == 1) {
        type4 = "红色药水";
      } else if (pc.getitempotion1() == 2) {
        type4 = "橙色药水";
      } else if (pc.getitempotion1() == 3) {
        type4 = "白色药水";
      } else if (pc.getitempotion1() == 4) {
        type4 = "浓缩红水";
      } else if (pc.getitempotion1() == 5) {
        type4 = "浓缩橙水";
      } else if (pc.getitempotion1() == 6) {
        type4 = "浓缩白水";
      } else if (pc.getitempotion1() == 7) {
        type4 = "古代红水";
      } else if (pc.getitempotion1() == 8) {
        type4 = "古代橙水";
      } else if (pc.getitempotion1() == 9) {
        type4 = "古代白水";
      } 
    } else {
      type4 = "尚未设定";
    } 
    if (pc.getpotioncount1() > 0) {
      int i = pc.getpotioncount1();
    } else {
      type5 = "0";
    } 
    if (pc.getitempotion2() > 0) {
      if (pc.getitempotion2() == 1) {
        type6 = "箭";
      } else if (pc.getitempotion2() == 2) {
        type6 = "银箭";
      } 
    } else if (pc.getitempotion2() == 0) {
      type6 = "尚未设定";
    } 
    if (pc.getpotioncount2() > 0) {
      int i = pc.getpotioncount2();
    } else {
      type7 = "0";
    } 
    if (pc.getgo_guajitele()) {
      type8 = "[开启]";
    } else {
      type8 = "[关闭]";
    } 
    if (pc.getgo_guajired()) {
      type9 = "[开启]";
    } else {
      type9 = "[关闭]";
    } 
    if (pc.IsAttackTeleport()) {
      type10 = "[开启]";
    } else {
      type10 = "[关闭]";
    } 
    if (pc.IsEnemyTeleport()) {
      type11 = "[开启]";
    } else {
      type11 = "[关闭]";
    } 
    if (pc.getma1() > 0) {
      int i = pc.getma1();
    } else {
      type12 = "未设置";
    } 
    if (pc.getchecksummid()) {
      type13 = "[开启]";
    } else {
      type13 = "[关闭]";
    } 
    if (pc.getsummon_skillid() > 0) {
      if (pc.getsummon_skillid() == 1) {
        type14 = "[初治愈]";
      } else if (pc.getsummon_skillid() == 19) {
        type14 = "[中治愈]";
      } else if (pc.getsummon_skillid() == 35) {
        type14 = "[高治愈]";
      } else if (pc.getsummon_skillid() == 57) {
        type14 = "[全治愈]";
      } 
    } else {
      type14 = "[尚未设置]";
    } 
    if (pc.getchecksummidhp()) {
      type15 = "[开启]";
    } else {
      type15 = "[关闭]";
    } 
    if (pc.getmobatk()) {
      type16 = "[开启]";
    } else {
      type16 = "[关闭]";
    } 
    pc.sendPackets((ServerBasePacket)new S_NPCTalkReturn(pc.getId(), "AI", new String[] { 
            type1, type2, type3, type4, type5, type6, 
            type7, type8, type9, type10, 
            type11, type12, type13, type14, type15, type16 }));
  }
  
  public void guaji_ai04(L1PcInstance pc) {
    String type1 = "";
    String type2 = "";
    String type3 = "";
    String type4 = "";
    String type5 = "";
    String type6 = "";
    String type7 = "";
    String type8 = "";
    String type9 = "";
    String type10 = "";
    String type11 = "";
    String type12 = "";
    String type13 = "";
    String type14 = "";
    String type15 = "";
    String type16 = "";
    String type17 = "";
    if (pc.get_fwgj() > 0) {
      int i = pc.get_fwgj();
    } else {
      type1 = "0";
    } 
    if (pc.getitempotion() > 0) {
      if (pc.getitempotion() == 1) {
        type2 = "红色药水";
      } else if (pc.getitempotion() == 2) {
        type2 = "橙色药水";
      } else if (pc.getitempotion() == 3) {
        type2 = "白色药水";
      } else if (pc.getitempotion() == 4) {
        type2 = "浓缩红水";
      } else if (pc.getitempotion() == 5) {
        type2 = "浓缩橙水";
      } else if (pc.getitempotion() == 6) {
        type2 = "浓缩白水";
      } else if (pc.getitempotion() == 7) {
        type2 = "古代红水";
      } else if (pc.getitempotion() == 8) {
        type2 = "古代橙水";
      } else if (pc.getitempotion() == 9) {
        type2 = "古代白水";
      } 
    } else {
      type2 = "尚未设定";
    } 
    if (pc.getpotioncount() > 0) {
      int i = pc.getpotioncount();
    } else {
      type3 = "0";
    } 
    if (pc.getitempotion1() > 0) {
      if (pc.getitempotion1() == 1) {
        type4 = "红色药水";
      } else if (pc.getitempotion1() == 2) {
        type4 = "橙色药水";
      } else if (pc.getitempotion1() == 3) {
        type4 = "白色药水";
      } else if (pc.getitempotion1() == 4) {
        type4 = "浓缩红水";
      } else if (pc.getitempotion1() == 5) {
        type4 = "浓缩橙水";
      } else if (pc.getitempotion1() == 6) {
        type4 = "浓缩白水";
      } else if (pc.getitempotion1() == 7) {
        type4 = "古代红水";
      } else if (pc.getitempotion1() == 8) {
        type4 = "古代橙水";
      } else if (pc.getitempotion1() == 9) {
        type4 = "古代白水";
      } 
    } else {
      type4 = "尚未设定";
    } 
    if (pc.getpotioncount1() > 0) {
      int i = pc.getpotioncount1();
    } else {
      type5 = "0";
    } 
    if (pc.getitempotion2() > 0) {
      if (pc.getitempotion2() == 1) {
        type6 = "箭";
      } else if (pc.getitempotion2() == 2) {
        type6 = "银箭";
      } 
    } else if (pc.getitempotion2() == 0) {
      type6 = "尚未设定";
    } 
    if (pc.getpotioncount2() > 0) {
      int i = pc.getpotioncount2();
    } else {
      type7 = "0";
    } 
    if (pc.getgo_guajitele()) {
      type8 = "[开启]";
    } else {
      type8 = "[关闭]";
    } 
    if (pc.getgo_guajired()) {
      type9 = "[开启]";
    } else {
      type9 = "[关闭]";
    } 
    if (pc.IsAttackTeleport()) {
      type10 = "[开启]";
    } else {
      type10 = "[关闭]";
    } 
    if (pc.IsEnemyTeleport()) {
      type11 = "[开启]";
    } else {
      type11 = "[关闭]";
    } 
    if (pc.getma1() > 0) {
      int i = pc.getma1();
    } else {
      type12 = "未设置";
    } 
    if (pc.getchecksummid()) {
      type13 = "[开启]";
    } else {
      type13 = "[关闭]";
    } 
    if (pc.getsummon_skillid() > 0) {
      if (pc.getsummon_skillid() == 1) {
        type14 = "[初治愈]";
      } else if (pc.getsummon_skillid() == 19) {
        type14 = "[中治愈]";
      } else if (pc.getsummon_skillid() == 35) {
        type14 = "[高治愈]";
      } else if (pc.getsummon_skillid() == 57) {
        type14 = "[全治愈]";
      } 
    } else {
      type14 = "[尚未设置]";
    } 
    if (pc.getchecksummidhp()) {
      type15 = "[开启]";
    } else {
      type15 = "[关闭]";
    } 
    if (pc.getmobatk()) {
      type16 = "[开启]";
    } else {
      type16 = "[关闭]";
    } 
    pc.sendPackets((ServerBasePacket)new S_NPCTalkReturn(pc.getId(), "AI", new String[] { 
            type1, type2, type3, type4, type5, type6, 
            type7, type8, type9, type10, 
            type11, type12, type13, type14, type15, type16 }));
  }
  
  public void guaji_ai05(L1PcInstance pc) {
    String type1 = "";
    String type2 = "";
    String type3 = "";
    String type4 = "";
    String type5 = "";
    String type6 = "";
    String type7 = "";
    String type8 = "";
    String type9 = "";
    String type10 = "";
    String type11 = "";
    String type12 = "";
    String type13 = "";
    String type14 = "";
    String type15 = "";
    String type16 = "";
    String type17 = "";
    if (pc.get_fwgj() > 0) {
      int i = pc.get_fwgj();
    } else {
      type1 = "0";
    } 
    if (pc.getitempotion() > 0) {
      if (pc.getitempotion() == 1) {
        type2 = "红色药水";
      } else if (pc.getitempotion() == 2) {
        type2 = "橙色药水";
      } else if (pc.getitempotion() == 3) {
        type2 = "白色药水";
      } else if (pc.getitempotion() == 4) {
        type2 = "浓缩红水";
      } else if (pc.getitempotion() == 5) {
        type2 = "浓缩橙水";
      } else if (pc.getitempotion() == 6) {
        type2 = "浓缩白水";
      } else if (pc.getitempotion() == 7) {
        type2 = "古代红水";
      } else if (pc.getitempotion() == 8) {
        type2 = "古代橙水";
      } else if (pc.getitempotion() == 9) {
        type2 = "古代白水";
      } 
    } else {
      type2 = "尚未设定";
    } 
    if (pc.getpotioncount() > 0) {
      int i = pc.getpotioncount();
    } else {
      type3 = "0";
    } 
    if (pc.getitempotion1() > 0) {
      if (pc.getitempotion1() == 1) {
        type4 = "红色药水";
      } else if (pc.getitempotion1() == 2) {
        type4 = "橙色药水";
      } else if (pc.getitempotion1() == 3) {
        type4 = "白色药水";
      } else if (pc.getitempotion1() == 4) {
        type4 = "浓缩红水";
      } else if (pc.getitempotion1() == 5) {
        type4 = "浓缩橙水";
      } else if (pc.getitempotion1() == 6) {
        type4 = "浓缩白水";
      } else if (pc.getitempotion1() == 7) {
        type4 = "古代红水";
      } else if (pc.getitempotion1() == 8) {
        type4 = "古代橙水";
      } else if (pc.getitempotion1() == 9) {
        type4 = "古代白水";
      } 
    } else {
      type4 = "尚未设定";
    } 
    if (pc.getpotioncount1() > 0) {
      int i = pc.getpotioncount1();
    } else {
      type5 = "0";
    } 
    if (pc.getitempotion2() > 0) {
      if (pc.getitempotion2() == 1) {
        type6 = "箭";
      } else if (pc.getitempotion2() == 2) {
        type6 = "银箭";
      } 
    } else if (pc.getitempotion2() == 0) {
      type6 = "尚未设定";
    } 
    if (pc.getpotioncount2() > 0) {
      int i = pc.getpotioncount2();
    } else {
      type7 = "0";
    } 
    if (pc.getgo_guajitele()) {
      type8 = "[开启]";
    } else {
      type8 = "[关闭]";
    } 
    if (pc.getgo_guajired()) {
      type9 = "[开启]";
    } else {
      type9 = "[关闭]";
    } 
    if (pc.IsAttackTeleport()) {
      type10 = "[开启]";
    } else {
      type10 = "[关闭]";
    } 
    if (pc.IsEnemyTeleport()) {
      type11 = "[开启]";
    } else {
      type11 = "[关闭]";
    } 
    if (pc.getma1() > 0) {
      int i = pc.getma1();
    } else {
      type12 = "未设置";
    } 
    if (pc.getchecksummid()) {
      type13 = "[开启]";
    } else {
      type13 = "[关闭]";
    } 
    if (pc.getsummon_skillid() > 0) {
      if (pc.getsummon_skillid() == 1) {
        type14 = "[初治愈]";
      } else if (pc.getsummon_skillid() == 19) {
        type14 = "[中治愈]";
      } else if (pc.getsummon_skillid() == 35) {
        type14 = "[高治愈]";
      } else if (pc.getsummon_skillid() == 57) {
        type14 = "[全治愈]";
      } 
    } else {
      type14 = "[尚未设置]";
    } 
    if (pc.getchecksummidhp()) {
      type15 = "[开启]";
    } else {
      type15 = "[关闭]";
    } 
    if (pc.getmobatk()) {
      type16 = "[开启]";
    } else {
      type16 = "[关闭]";
    } 
    pc.sendPackets((ServerBasePacket)new S_NPCTalkReturn(pc.getId(), "AI", new String[] { 
            type1, type2, type3, type4, type5, type6, 
            type7, type8, type9, type10, 
            type11, type12, type13, type14, type15, type16 }));
  }
  
  public void guaji(L1PcInstance pc) {
    String type1 = "";
    String type2 = "";
    String type3 = "";
    String type4 = "";
    String type5 = "";
    String type6 = "";
    String type7 = "";
    String type8 = "";
    String type9 = "";
    String type10 = "";
    String type11 = "";
    String type12 = "";
    String type13 = "";
    String type14 = "";
    String type15 = "";
    String type16 = "";
    String type17 = "";
    String type18 = "";
    if (pc.get_fwgj() > 0) {
      int i = pc.get_fwgj();
    } else {
      type1 = "0";
    } 
    if (pc.getitempotion() > 0) {
      if (pc.getitempotion() == 1) {
        type2 = "红色药水";
      } else if (pc.getitempotion() == 2) {
        type2 = "橙色药水";
      } else if (pc.getitempotion() == 3) {
        type2 = "白色药水";
      } else if (pc.getitempotion() == 4) {
        type2 = "浓缩红水";
      } else if (pc.getitempotion() == 5) {
        type2 = "浓缩橙水";
      } else if (pc.getitempotion() == 6) {
        type2 = "浓缩白水";
      } else if (pc.getitempotion() == 7) {
        type2 = "古代红水";
      } else if (pc.getitempotion() == 8) {
        type2 = "古代橙水";
      } else if (pc.getitempotion() == 9) {
        type2 = "古代白水";
      } 
    } else {
      type2 = "尚未设定";
    } 
    if (pc.getpotioncount() > 0) {
      int i = pc.getpotioncount();
    } else {
      type3 = "0";
    } 
    if (pc.getitempotion1() > 0) {
      if (pc.getitempotion1() == 1) {
        type4 = "红色药水";
      } else if (pc.getitempotion1() == 2) {
        type4 = "橙色药水";
      } else if (pc.getitempotion1() == 3) {
        type4 = "白色药水";
      } else if (pc.getitempotion1() == 4) {
        type4 = "浓缩红水";
      } else if (pc.getitempotion1() == 5) {
        type4 = "浓缩橙水";
      } else if (pc.getitempotion1() == 6) {
        type4 = "浓缩白水";
      } else if (pc.getitempotion1() == 7) {
        type4 = "古代红水";
      } else if (pc.getitempotion1() == 8) {
        type4 = "古代橙水";
      } else if (pc.getitempotion1() == 9) {
        type4 = "古代白水";
      } 
    } else {
      type4 = "尚未设定";
    } 
    if (pc.getpotioncount1() > 0) {
      int i = pc.getpotioncount1();
    } else {
      type5 = "0";
    } 
    if (pc.getitempotion2() > 0) {
      if (pc.getitempotion2() == 1) {
        type6 = "箭";
      } else if (pc.getitempotion2() == 2) {
        type6 = "银箭";
      } 
    } else if (pc.getitempotion2() == 0) {
      type6 = "尚未设定";
    } 
    if (pc.getpotioncount2() > 0) {
      int i = pc.getpotioncount2();
    } else {
      type7 = "0";
    } 
    if (pc.getgo_guajitele()) {
      type8 = "[开启]";
    } else {
      type8 = "[关闭]";
    } 
    if (pc.getgo_guajired()) {
      type9 = "[开启]";
    } else {
      type9 = "[关闭]";
    } 
    if (pc.IsAttackTeleport()) {
      type10 = "[开启]";
    } else {
      type10 = "[关闭]";
    } 
    if (pc.IsEnemyTeleport()) {
      type11 = "[开启]";
    } else {
      type11 = "[关闭]";
    } 
    if (pc.getma1() > 0) {
      int i = pc.getma1();
    } else {
      type12 = "未设置";
    } 
    if (pc.getchecksummid()) {
      type13 = "[开启]";
    } else {
      type13 = "[关闭]";
    } 
    if (pc.getsummon_skillid() > 0) {
      if (pc.getsummon_skillid() == 1) {
        type14 = "[初治愈]";
      } else if (pc.getsummon_skillid() == 19) {
        type14 = "[中治愈]";
      } else if (pc.getsummon_skillid() == 35) {
        type14 = "[高治愈]";
      } else if (pc.getsummon_skillid() == 57) {
        type14 = "[全治愈]";
      } 
    } else {
      type14 = "[尚未设置]";
    } 
    if (pc.getchecksummidhp()) {
      type15 = "[开启]";
    } else {
      type15 = "[关闭]";
    } 
    if (pc.getmobatk()) {
      type16 = "[开启]";
    } else {
      type16 = "[关闭]";
    } 
    pc.sendPackets((ServerBasePacket)new S_NPCTalkReturn(pc.getId(), "AI", new String[] { 
            type1, type2, type3, type4, type5, type6, 
            type7, type8, type9, type10, 
            type11, type12, type13, type14, type15, type16, "" }));
  }
}
